import {CHECK_PLAN,CHECK_TODAY_PLAN,SET_CURR_MISSION} from "../constants/checkPlan";

const INIT_STATE = {
    checkPlans:[]
};

export default function checkPlan(state = INIT_STATE, action) {
  switch (action.type) {
    case CHECK_PLAN:
      return { ...state, checkPlans: action.payload.data.data };
    case CHECK_TODAY_PLAN:
      return {...state,checkTodayPlan:action.payload.data.data};
      case SET_CURR_MISSION:
      return {...state,currentMission:action.payload}
    default:
      return state;
  }
}